package com.alm.handle.core.domain.entity.rs;

import lombok.Data;

import java.math.BigDecimal;

@Data
public class HomePageChartRS {
    private BigDecimal avgVoltage;

    private BigDecimal electricCurrent;

    private BigDecimal avgFrequency;

    private BigDecimal avgPowerFactor;

    private Long modifyTime;

    public HomePageChartRS(BigDecimal avgVoltage, BigDecimal electricCurrent, BigDecimal avgFrequency, BigDecimal avgPowerFactor) {
        this.avgVoltage = avgVoltage;
        this.electricCurrent = electricCurrent;
        this.avgFrequency = avgFrequency;
        this.avgPowerFactor = avgPowerFactor;
        this.modifyTime=System.currentTimeMillis();
    }

    public HomePageChartRS() {
        this.modifyTime=System.currentTimeMillis();
        BigDecimal zero=new BigDecimal(0);
        this.avgVoltage = zero;
        this.electricCurrent = zero;
        this.avgFrequency = zero;
        this.avgPowerFactor = zero;
    }
}
